<?php
// +----------------------------------------------------------------------
// | CatchAdmin [Just Like ～ ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017~{$year} http://catchadmin.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( https://github.com/yanwenwu/catch-admin/blob/master/LICENSE.txt )
// +----------------------------------------------------------------------
// | Author: JaguarJack [ njphper@gmail.com ]
// +----------------------------------------------------------------------
// you should use `$router`
/* @var think\Route $router */
$router->group(function () use($router) {
    // order 路由
    // $router->resource('order', catchAdmin\customs\controller\order::class);
    $router->post('order/index', '\\catchAdmin\\customs\\controller\\Order@index');
    // 申报订单
    $router->post('order/declareOrder', '\\catchAdmin\\customs\\controller\\Order@declareOrder');
    // 修改订单
    $router->post('order/edit', '\\catchAdmin\\customs\\controller\\Order@edit');
    // 查询订单回执
    $router->post('order/receiptOrder', '\\catchAdmin\\customs\\controller\\Order@receiptOrder');
    // 清单列表
    $router->post('order/clearList', '\\catchAdmin\\customs\\controller\\Order@clearList');
    // 清关列表（放行）
    $router->post('order/finishClearList', '\\catchAdmin\\customs\\controller\\Order@finishClearList');
    // 申报清单
    $router->post('order/declareDetailedList', '\\catchAdmin\\customs\\controller\\Order@declareDetailedList');
    // 查询清单回执
    $router->post('order/receiptDetailedList', '\\catchAdmin\\customs\\controller\\Order@receiptDetailedList');
    // 写入日志
    $router->post('order/writeLog', '\\catchAdmin\\customs\\controller\\Order@writeLog');
    // 泰州海关申报/变更订单
    $router->post('order/taizhouPushOrders', '\\catchAdmin\\customs\\controller\\Taizhou@pushOrders');
    // 泰州海关申报/变更清单
    $router->post('order/taizhouPushClearOrders', '\\catchAdmin\\customs\\controller\\Taizhou@pushClearOrders');
    // 订单信息关联列表
    $router->post('order/joinList', '\\catchAdmin\\customs\\controller\\Order@joinList');
    // 订单基础数据删除
    $router->post('order/delOrder', '\\catchAdmin\\customs\\controller\\Order@delete');
    // 测试接口
    $router->post('order/test', '\\catchAdmin\\customs\\controller\\Order@test');
    // 导出海关订单xml
    $router->post('order/orderXml', '\\catchAdmin\\customs\\controller\\Order@exportOrderXml');
    //导出海关清单xml
    $router->post('order/inventoryXml', '\\catchAdmin\\customs\\controller\\Order@exportInventoryXml');
    //下载导入模板
    $router->post('order/downTemplate', '\\catchAdmin\\customs\\controller\\Order@downTemplate');
    //物流导入
    $router->post('order/importLogistics', '\\catchAdmin\\customs\\controller\\Order@importLogistics');
    //订单导出
    $router->post('order/exportOrder', '\\catchAdmin\\customs\\controller\\Order@exportOrder');
    //订单商品导出
    $router->post('order/exportOrderGoods', '\\catchAdmin\\customs\\controller\\Order@exportOrderGoods');
    //清单导出
    $router->post('order/exportClearOrder', '\\catchAdmin\\customs\\controller\\Order@exportClearOrder');
    //清单商品导出
    $router->post('order/exportClearOrderGoods', '\\catchAdmin\\customs\\controller\\Order@exportClearOrderGoods');
    //清关导出（放行）
    $router->post('order/exportFinishClearOrder', '\\catchAdmin\\customs\\controller\\Order@exportFinishClearOrder');
    //清关导出（放行）
    $router->post('order/exportFinishClearOrderGoods', '\\catchAdmin\\customs\\controller\\Order@exportFinishClearOrderGoods');
    //账册导入
    $router->post('account/importAccount', '\\catchAdmin\\customs\\controller\\Account@importAccount');
    //账册列表
    $router->post('account/index', '\\catchAdmin\\customs\\controller\\Account@index');
    //账册修改
    $router->post('account/update', '\\catchAdmin\\customs\\controller\\Account@update');
    //账册删除
    $router->post('account/delete', '\\catchAdmin\\customs\\controller\\Account@delete');
    //首页统计
    $router->post('Index/statistics', '\\catchAdmin\\customs\\controller\\Index@statistics');
    // 海关编码
    $router->post('customscode/index', '\\catchAdmin\\customs\\controller\\Customscode@index');
    // 海关修改
    $router->post('customscode/update', '\\catchAdmin\\customs\\controller\\Customscode@update');
    // 海关删除
    $router->post('customscode/delete', '\\catchAdmin\\customs\\controller\\Customscode@delete');
    //海关编码导入
    $router->post('customscode/importCustomscode', '\\catchAdmin\\customs\\controller\\Customscode@importCustomscode');
})->middleware('auth');
// 消息
$router->rule('customs/platDataOpen', '\\catchAdmin\\customs\\controller\\Customs@platDataOpen', 'POST');
$router->rule('customs/poll_sign', '\\catchAdmin\\customs\\controller\\Customs@poll_sign', 'GET|POST');
$router->rule('customs/realTimeDataUp', '\\catchAdmin\\customs\\controller\\Customs@realTimeDataUp', 'POST');

$router->group(function () use($router) {

    //候鸟推送
    $router->post('hnorder/push/:id', '\\catchAdmin\\customs\\controller\\HnOrder@push');
    $router->get('hnorder/index', '\\catchAdmin\\customs\\controller\\HnOrder@index');

    //菜鸟推送
    $router->post('cnorder/push/:id', '\\catchAdmin\\customs\\controller\\CnOrder@push');//推单
    $router->get('cnorder/index', '\\catchAdmin\\customs\\controller\\CnOrder@index');//订单列表
    $router->get('cnorder/queryOrder/:id', '\\catchAdmin\\customs\\controller\\CnOrder@queryOrder');//查询订单物流
    $router->put('cnorder/modifyInfo/:id', '\\catchAdmin\\customs\\controller\\CnOrder@modifyInfo');//修改身份号码

    //新生支付
    $router->get('xspay/index', '\\catchAdmin\\customs\\controller\\XsPay@index');
    $router->get('xspay/query/:id', '\\catchAdmin\\customs\\controller\\XsPay@query');
    //推送支付单
    $router->post('xspay/customsApply/:id', '\\catchAdmin\\customs\\controller\\XsPay@customsApply');


})->middleware('auth');

